package com.jic.com.weamop;

import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import javax.annotation.PostConstruct;
import java.util.TimeZone;

@SpringBootApplication
@EnableTransactionManagement
@MapperScan("com.jic.weamop.mapper")
@EnableSwagger2
@EnableSwaggerBootstrapUI
@EnableDiscoveryClient
@EnableScheduling

/**
 * Created by messigao on 2018/09/28.
 */
@ComponentScan(basePackages = "com.jic.weamop", lazyInit = true)

// 是否允许 集成到swagger里
public class JicWeAMOPApplication {

	public static void main(String[] args) {
		SpringApplication.run(JicWeAMOPApplication.class, args);
}

	/**
	 * 时区设置
	 */
	@PostConstruct
	void started() {
		TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
	}
}
